package day0926;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Ques1020BubbleSort2 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = 0;
		List<Integer> scoreList = new ArrayList<Integer>();
		while(scan.hasNext()){
			n = scan.nextInt();
			for(int i = 0;i < n;i++){
				scoreList.add(scan.nextInt());
			}
			
			int left = 0;
			int right = scoreList.size() - 1;
			int curNum = 0;
			int nextNum = 0;
			int preNum = 0;
			
			while(left < right){
				for(int i = left;i < right ; i++){
					curNum = scoreList.get(i);
					nextNum = scoreList.get(i + 1);
					if(curNum > nextNum){
						scoreList.set(i + 1, curNum);
						scoreList.set(i, nextNum);
					}
				}
				right --;
				for(int i = right;i > left;i --){
					curNum = scoreList.get(i);
					preNum = scoreList.get(i + 1);
					if(preNum > curNum){
						scoreList.set(i - 1, curNum);
						scoreList.set(i, preNum);
					}
				}
				left ++;
			}
			for(int i : scoreList){
				System.out.println(i);
			}
		}
	}
}
